const routes = [
  // 柜体寄件套餐配置
  {
    name: "sendAPackageList", // 列表
    path: "/sendAPackage/list",
    component: "/sendAPackage/list"
  },
  {
    name: "sendAPackageImport", // 导入资费
    path: "/sendAPackage/list/import",
    component: "/sendAPackage/import",
    hideInMenu: true,
  },
  {
    name: "sendAPackageDetail", // 详情
    path: "/sendAPackage/list/detail",
    component: "/sendAPackage/detail",
    hideInMenu: true,
  },
  {
    name: 'sendAPackageCourierList', // 配置快递公司
    path: "/sendAPackage/list/courier",
    component: "/sendAPackage/courier",
    hideInMenu: true,
  },
  // 柜体寄件资费配置
  {
    name: "cabinetDeliveryChargeList", // 列表
    path: "/cabinetDeliveryCharge/list",
    component: "/cabinetDeliveryCharge/list"
  },
  {
    name: "cabinetDeliveryChargeDetail", // 详情
    path: "/cabinetDeliveryCharge/list/detail",
    component: "/cabinetDeliveryCharge/detail",
    hideInMenu: true,
  },
  // 驿站资费配置
  {
    name: "postChargesList", // 列表
    path: "/postCharges/list",
    component: "/postCharges/list"
  },
  {
    name: "postChargesAdd", // 新增
    path: "/postCharges/list/add",
    component: "/postCharges/add",
    hideInMenu: true,
  },
  {
    name: "postChargesEdit", // 编辑
    path: "/postCharges/list/edit",
    component: "/postCharges/add",
    hideInMenu: true,
  },
  // 柜体套餐
  {
    name: "cabinetPlansList",
    path: "/cabinetPlans/list",
    component: "/cabinetPlans/list",
  },
  {
    name: "cabinetPlansAdd",
    path: "/cabinetPlans/list/add",
    component: "/cabinetPlans/add",
    hideInMenu: true,
  },
  {
    name: "cabinetPlansEdit",
    path: "/cabinetPlans/list/edit",
    component: "/cabinetPlans/add",
    hideInMenu: true,
  },
  {
    name: "cabinetPlansDetail",
    path: "/cabinetPlans/list/detail",
    component: "/cabinetPlans/detail",
    hideInMenu: true,
  },
  {
    name: "cabinetPlansLogs", // 修改日志
    path: "/cabinetPlans/list/logs",
    component: "/cabinetPlans/logs",
    hideInMenu: true,
  },
  // 兼职工资配置
  {
    name: "partTimeWageAllocationList",
    path: "/partTimeWageAllocation/list",
    component: "/partTimeWageAllocation/list"
  },
   // 甘肃农信柜体
   {
    name: "bankPaymentManage",
    path: "/bankPaymentManage/list",
    component: "/bankPaymentManage/list"
  },
]

const charges = routes.map((route: any) => {
  route.path = `/charges${route.path}`;
  route.component = `./charges${route.component}`;
  return route;
}, {});

export default [
  {
    name: "charges",
    path: "/charges",
    icon: "smile",
    routes: [
      ...charges,
      {
        component: "./404"
      }
    ]
  }
]
